const express = require('express');
const get = require('./get');
const post = require('./post');
const delete_ = require('./delete');

// express有提供一个顶级的路由模块。直接使用
const router = express.Router();

router.use(get)
router.use(post)
router.use(delete_)

router.use('***', (req, resp) => {
  resp.status(404)
  resp.json({ msg: '没有对应的url' })
})

module.exports = router